<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:import url="/WEB-INF/include/checkLogin.jsp" />
<!doctype html>
<html lang="zh">
<head>
	<meta charset="utf-8">
	<title>Quik Demo Page</title>
	<link href="<c:url value="/resources/css/start/jquery-ui-1.10.4.custom.css"/>" rel="stylesheet" />
	<script src="<c:url value="/resources/js/jquery-1.7.2.js"/>"></script>
	<script src="<c:url value="/resources/js/jquery-ui-1.10.4.custom.js"/>"></script>
	<script>
	
	$(function() {
		$( "#radioset" ).buttonset();

		<c:forEach var="right" items="${rights}" varStatus="status">
			<c:if test="${status.index==0}">
				changeMenuAction('menu','${right.access_right_code}');
			</c:if>
		</c:forEach>
	});
	function changeMenuAction(type, url){
		var src = '${pageContext.request.contextPath}'+url;
		if(type=='menu'){
			$('#mainFrame').attr('src',src);
		}else if(type=='logout'){
			var r = confirm('是否确认注销当情登录用户？');
			if(r) $("#logoutForm").submit();
		}
		
	}
	</script>
	<style>
	body{
		font: 100% "微软雅黑", "YouYuan";
		margin: 10px;
	}
	</style>
</head>
<body>
<table style='border:0px solid black;width:1200px;' border='0' align='center'>
<tr>
<td align='center'>
	<div id="radioset">
		<c:forEach var="right" items="${rights}" varStatus="status">
			<c:if test="${right.access_right_type == 'menu' }">
		<input type="radio" id="menu${right.id}" name="radio" onchange='changeMenuAction("menu","${right.access_right_code}")'><label for="menu${right.id}">${right.access_right_name}</label>
			</c:if>
		</c:forEach>
		<input type="radio" id="menu999999999" name="radio" onchange='changeMenuAction("logout","/login/logout")'><label for="menu999999999">注销</label>
		<!-- 
		<input type="radio" id="radio1" name="radio"><label for="radio1">手牌总览</label>
		<input type="radio" id="radio2" name="radio" checked="checked"><label for="radio2">房间总览</label>
		<input type="radio" id="radio3" name="radio"><label for="radio3">未结账单</label>
		<input type="radio" id="radio4" name="radio"><label for="radio4">已结账单</label>
		<input type="radio" id="radio5" name="radio"><label for="radio5">营业日处理</label>
		<input type="radio" id="radio6" name="radio"><label for="radio6">发&nbsp;&nbsp;&nbsp;&nbsp;票</label>
		<input type="radio" id="radio7" name="radio"><label for="radio7">消&nbsp;&nbsp;&nbsp;&nbsp;费</label>
		<input type="radio" id="radio8" name="radio"><label for="radio8">房间预定</label>
		<input type="radio" id="radio9" name="radio"><label for="radio9">技师处理</label> -->
	</div>
</td>
</tr>
<tr>
<td><div>
<iframe id='mainFrame' src=''  style='width:1180px;height:550px;border: 1px solid black'></iframe>
</div></td>
</tr>
<tr>
<td align='center'>登录用户：S001, 登录时间：10:53:20</td>
</tr>
</table>
<form name="logoutForm" id="logoutForm" action="../login/logout" method="post" style='display:none'></form>
</body>
</html>
